package com.gitee.web.controller;

import com.gitee.business.entity.OrderPo;
import com.gitee.business.entity.UserPo;
import com.gitee.core.common.web.BaseController;
import com.gitee.web.service.OrderServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/order")
@Slf4j
public class OrderController extends BaseController{

    @Autowired
    private OrderServiceImpl orderService;


    @RequestMapping("/selectAll")
    @ResponseBody
    public List<OrderPo> selectAll(Model model) {
        log.info("调用selectAll方法");
        List<OrderPo> list = orderService.selectAll();
        return list;
    }


}
